struct Point{
    var x=0
    var y=0
}

class Shape{
    var no=0
    
    func move() {
        print("NO: \(no) Shape.move")
    }
}


class Rectangle: Shape{
    var leftUp=Point()
    var width=0
    var height=0
    
}

class Circle: Shape{
    var center=Point()
    var radius=0
}


func process(shape: Shape){
    shape.no++
    shape.move()
}

var r1=Rectangle()
var c1=Circle()

//成员复用
r1.no++
r1.move()

c1.no++
c1.move()

//类型抽象
process(c1)
process(r1)

var s:Shape
s=c1
s=r1







